﻿using System;

namespace winS.Unity
{
    /// <summary>
    /// 每帧后调用函数
    /// </summary>
    internal class LateUpdateFunction : Function
    {
        private readonly Action<float> function;

        internal LateUpdateFunction(Action<float> function)
        {
            this.function = function;
        }

        internal override void Update(float deltaTime)
        {
            function?.Invoke(deltaTime);
        }
    }
}